package com.jyniubi.sms;

import feign.Logger;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;


@SpringBootApplication(exclude = DataSourceAutoConfiguration.class)
@ComponentScan(basePackages = {"com.jyniubi"})
@EnableFeignClients //扫描启动类所在的包和子包下的FeignClient注解标注的接口并创建对象
public class SmsApplication {
    public static void main(String[] args) {
        SpringApplication.run(SmsApplication.class,args);
    }
    //向容器中注入feign客户端的日志级别(输出哪些日志)对象
    @Bean
    public Logger.Level level(){
        //feign客户端的日志默认以debug级别输出，需要降低slf4j日志输出级别为debug
        return Logger.Level.FULL;
    }
}
